/**
 * DoctorsOrder.java
 * @author Peter
 */
package edu.gatech.coc.betameisters.infoholders;

import java.io.Serializable;

/**
 * Doctors Orders class
 * Stores and hold information regarding doctors custom orders
 * @author Peter
 * @version 1.0
 */
public class DoctorsOrders implements Serializable {

	/**
	 * 
	 */
	private static final long serialVersionUID = -1147506277173166550L;

	/**
	 * Field message - doctor's message
	 */
	private String message;

	/**
	 * Field prescriptionOrder - prescription for patient
	 */
	private Prescription prescriptionOrder;
	
	/**
	 * Field treatmentOrder - treatment for patient
	 */
	private Treatment treatmentOrder;
	
	/**
	 * Field comments - any comments from doctor
	 */
	private String comments;
	
	/**
	 * Field doctor - doctor that assigned this order
	 */
	private String doctor;
	
	/**
	 * Field patient - patient the order is for
	 */
	private String patient;
	
	/**
	 * Field labReport - the lab work report of a lab
	 */
	private LabWorkReport labReport;
	
	/**
	 * Constructor for a doctor's order
	 * @param aMessage - doctor's message
	 * @param doctorName - doctor's name
	 * @param patientName - patient's name
	 */
	public DoctorsOrders(String doctorName, String patientName, String aMessage){ // $codepro.audit.disable com.instantiations.assist.eclipse.analysis.audit.rule.effectivejava.constructorsOnlyInvokeFinalMethods
		setMessage(aMessage);
		setPatient(patientName);
		setDoctor(doctorName);
		setComments("");
	}
	
	/**
	 * Method that changes the message
	 * @param message
	 */
	public void setMessage(String message) {
		this.message = message;
	}

	/**
	 * Retrieves the order's message
	 * @return message
	 */
	public String getMessage() {
		return message;
	}
	
	/**
	 * Set or change the prescription prescribed to the patient
	 * @param prescriptionOrder
	 */
	public void setPrescriptionOrder(Prescription prescriptionOrder) {
		this.prescriptionOrder = prescriptionOrder;
	}
	
	/**
	 * Gets the prescription assigned to patient
	 * @return prescriptionOrder
	 */
	public Prescription getPrescriptionOrder() {
		return prescriptionOrder;
	}
	
	/**
	 * Set or change the treatment for patient
	 * @param treatmentOrder
	 */
	public void setTreatmentOrder(Treatment treatmentOrder) {
		this.treatmentOrder = treatmentOrder;
	}
	
	/**
	 * Gets the treatment assigned to patient
	 * @return treatmentOrder
	 */
	public Treatment getTreatmentOrder() {
		return treatmentOrder;
	}
	
	/**
	 * Set or change the comments of the doctor's order
	 * @param comments
	 */
	public void setComments(String comments) {
		this.comments = comments;
	}
	
	/**
	 * Gets the comments on the doctor's order
	 * @return comments
	 */
	public String getComments() {
		return comments;
	}
	
	/**
	 * Set or change the patient on the order
	 * @param patient
	 */
	public void setPatient(String patient) {
		this.patient = patient;
	}

	/**
	 * Gets the patient the order is assigned to
	 * @return patient
	 */
	public String getPatient() {
		return patient;
	}
	
	/**
	 * Set or change the lab results for patient
	 * @param labReport
	 */
	public void setLabReport(LabWorkReport labReport) {
		this.labReport = labReport;
	}

	/**
	 * Gets the result of a lab for patient
	 * @return labReport
	 */
	public LabWorkReport getLabReport() {
		return labReport;
	}
	
	/**
	 * Set or change the doctor for patient
	 * @param doctor
	 */
	public void setDoctor(String doctor) {
		this.doctor = doctor;
	}

	/**
	 * Gets the doctor that created this order
	 * @return doctor
	 */
	public String getDoctor() {
		return doctor;
	}
	
	/**
	 * Overrides the toString method
	 * @return returns the order
	 */
	public String toString(){
		return "Doctor " + getDoctor() + 
		"'s Order for " + patient + ".\n" + message
		+ "\nCOMMENTS: " + comments; 
	}
}
